import axios from '../network/axios'
import md5 from 'js-md5'
// 获取二维码
function getLoginQrcode(data = {}) {
  return axios.post('api/account/getLoginQrcode', data)
}
function login(data = {}) {
  return axios.post('api/account/login', data)
}
function logout(data = {}) {
  return axios.post('api/account/logout', data)
}
function qrCodeLogin(data = {}) {
  return axios.post('api/account/qrCodeLogin', data)
}
function wechatLogin(data = {}) {
  return axios.post('api/account/wechatLogin', data)
}
// function reqLogin(mobilePhone: string, password: string, salt: string) {
//   const params = {
//     password: md5(password + salt),
//     mobilePhone: mobilePhone
//   }xS
//   return axios.post('api/account/login', params)
// }

export {
  getLoginQrcode,
  login,
  logout,
  qrCodeLogin,
  wechatLogin
  // reqLogin,
}